package org.chen.user.mapper;

import org.chen.mybatis.annotation.Insert;
import org.chen.mybatis.annotation.Mapper;
import org.chen.mybatis.annotation.Select;
import org.chen.user.domain.UserDomain;

/**
 * 用户Mapper
 *
 * @author Chen
 * @since 2023/6/9 11:10
 */
@Mapper
public interface UserMapper {

    @Select("select * from user where id = #{id}")
    UserDomain getById(String id);

    @Insert("INSERT INTO user (phone,password,nickname) VALUES (#{phone}, #{password}, #{nickname})")
    int insert(String phone, String password, String nickname);
}
